package com.guli.gulimall.gulimallproduct.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.guli.common.utils.PageUtils;
import com.guli.gulimall.gulimallproduct.entity.AttrEntity;
import com.guli.gulimall.gulimallproduct.vo.AttrGroupRelationVo;
import com.guli.gulimall.gulimallproduct.vo.AttrRespVo;
import com.guli.gulimall.gulimallproduct.vo.AttrVo;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author zouzhi
 * @email 1245268075@qq.com
 * @date 2022-04-03 10:19:09
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveAttr(AttrVo attr);

//    PageUtils queryBasePage(Map<String, Object> params, Long catId);

    AttrRespVo getAttrInfor(Long attrId);

    void updateAttr(AttrVo attr);

    PageUtils queryBasePage(Map<String, Object> params, Long catId, String attrType);

    List<AttrEntity> getRelationAttr(Long attr_group_id);

    void deleRelation(AttrGroupRelationVo[] vos);

    PageUtils getNoRelationAttr(Long attr_group_id, Map<String, Object> params);

    /**
     * 在指定的所有属性集合里面，挑选出检索属性
     * @param attrids
     * @return
     */
    List<Long> selectSearchAttrs(List<Long> attrids);
}

